Expand description
§object
The object
crate provides a unified interface to working with object files
across platforms. It supports reading relocatable object files and executable files,
and writing relocatable object files and some executable files.
§Raw struct definitions
Raw structs are defined for: ELF, Mach-O, PE/COFF,
XCOFF, archive.
Types and traits for zerocopy support are defined in the pod
and endian
modules.
§Unified read API
The read
module provides a unified read API using the read::Object
trait.
There is an implementation of this trait for read::File
, which allows reading any
file format, as well as implementations for each file format.
§Low level read API
The read
submodules define helpers that operate on the raw structs.
These can be used instead of the unified API, or in conjunction with it to access
details that are not available via the unified API.
§Unified write API
The write
module provides a unified write API for relocatable object files
using write::Object
. This does not support writing executable files.
§Low level write API
The write
submodules define helpers for writing the raw structs.
§Build API
The build
submodules define helpers for building object files, either from
scratch or by modifying existing files.
§Shared definitions
The crate provides a number of definitions that are used by both the read and write APIs. These are defined at the top level module, but none of these are the main entry points of the crate.
Re-exports§
Modules§
- Archive definitions.
- Interface for building object files.
- ELF definitions.
- Types for compile-time and run-time endianness.
- Mach-O definitions.
- PE/COFF definitions.
- Tools for converting file format structures to and from bytes.
- Interface for reading object files.
- Interface for writing object files.
- XCOFF definitions
Enums§
- The size of an address value for an architecture.
- A CPU architecture.
- A binary file format.
- The selection kind for a COMDAT section group.
- File flags that are specific to each file format.
- Information about how the result of the relocation operation is encoded in the place.
- Relocation fields that are specific to each file format and architecture.
- The operation used to calculate the result of the relocation.
- Section flags that are specific to each file format.
- The kind of a section.
- Segment flags that are specific to each file format.
- A CPU sub-architecture.
- Symbol flags that are specific to each file format.
- The kind of a symbol.
- A symbol scope.